package cn.bsyang.controller;

import cn.bsyang.domain.req.ShopCartReq;
import cn.bsyang.domain.res.PayOrderRes;
import cn.bsyang.wechat.service.IOrderService;
import com.alibaba.fastjson.JSON;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class TestController {

    @Resource
    IOrderService orderService;


    @GetMapping(value = "/copyLastTermEvalPlan")
    public String copyLastTermEvalPlan() {
        return JSON.toJSONString("启动成功");
    }


    @GetMapping(value = "/test_createOrder")
    public void test_createOrder() throws Exception {
        ShopCartReq shopCartReq = new ShopCartReq();
        shopCartReq.setUserId("xiaofuge");
        shopCartReq.setProductId("10001");
        PayOrderRes payOrderRes = orderService.createOrder(shopCartReq);
    }
}
